$(function () {
	$('#verification').click(function(){
		var mobile = $('#mobile').val();
		$.ajax({
			url: 'ajaxSendMessage.action',
			cache:false,
			data: 'mobile=' + encodeURIComponent(mobile),
			success: function(json){
				json = tohours.parseJSON(json);
				if(json.success){
					alert('发送成功！');
				} else {
					alert(json.msg);
				}
			}
		});
	});
	
	$('#btnExchange').click(function(){
		var mobile = $('#mobile').val();
		var code = $('#code').val();
		var giftId = $('#giftId').val();
		location.href = 'giftExchange.action?mobile={0}&code={1}&giftId={2}'.format(mobile, code, giftId);
	});
});